package org.ithang.application.btAddr.service;

import java.util.List;
import java.util.Map;
import org.ithang.application.btAddr.mapper.BtAddrMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.apache.log4j.Logger;
import org.ithang.tools.model.Pager;
import org.ithang.tools.database.ModelDao;
import org.ithang.tools.lang.DateUtils;
import org.ithang.application.btAddr.bean.BtAddr;

/**
 * 提币地址管理 服务
 * @author zyt
 *
 */
@Service
public class BtAddrService extends ModelDao<BtAddr>{

    @Autowired
    private BtAddrMapper btAddrMapper;

    private Logger logger = Logger.getLogger(BtAddrService.class);
    
    public void add(BtAddr btAddr){
    	btAddr.setCreate_time(DateUtils.getSystime());
        btAddrMapper.add(btAddr);
    }
    
    public BtAddr get(Integer id){
        return btAddrMapper.get(id);
    }
    
    public BtAddr getByAddr(String addr){
        return btAddrMapper.getByAddr(addr);
    }
    
    public int delete(Integer id){
        return btAddrMapper.delete(id);
    }
    
    public int batchDelete(String[] ids){
    	return btAddrMapper.batchDelete(ids);
    }
    
    public List<BtAddr> list(Integer... ids){
    	return btAddrMapper.list(ids);
    }
    
    public List<BtAddr> page(Pager<BtAddr> page){
    	return btAddrMapper.page(page);
    }
    
    public List<BtAddr> query(Map<String,Object> conditions){
    	return btAddrMapper.query(conditions);
    }
    
    public int update(BtAddr btAddr){
    	return btAddrMapper.update(btAddr);
    }
    
    
}